package com.tanhua.manager.job;

import com.tanhua.manager.service.AnalysisByDayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class AnalysisJob {

    @Autowired
    private AnalysisByDayService analysisByDayService;

//    @Scheduled(cron = "0 59 23 * * ?") //每天晚上23点59分开始执行
    @Scheduled(cron = "0 35 9 * * ?") // 为了方便测试，需要调整时间
    public void analysis(){

        analysisByDayService.analysis();

        System.out.println("定时任务已经执行完成..........");

    }

}
